// Binary I/O


#include <fstream>
#include <iostream>
using namespace std;


int main( void ) {
	ifstream ifs( "./getline", ios::ate );
	if( !ifs ){
		cerr << "err" << endl;
	}
	ofstream ofs( "./yufengguang", ios::out );
	if( !ofs ) {
		cerr << "ofstream" << endl;
	}
	int size = ifs.tellg( );	// Set the ptr to tail
	char buf[size];			// Get size
	ifs.seekg( 0, ios::beg );	// To read
	ifs.read( buf, size );

	ofs.write( buf, size );

	ofs.close( );
	ifs.close( );

	return 0;
}

